#include <iostream>
#include <sstream>
#include <string>
using namespace std;

int main()
{
    int a;
    string s;
    stringstream ss;
    cin>>a;
    ss<<a;
    ss>>s;
    for(string::reverse_iterator r_itr=s.rbegin();r_itr!=s.rend();++r_itr)
        cout<<*r_itr;
    cout << endl;
    return 0;
}
